import React from 'react'
import { Link } from 'react-router-dom'

export default function BreadCrumb({ data }) {
  return (
    <div className="breadcrumb">
      <div className="container">
        <h2>
          {
            data.map((item,i)=>(
              <React.Fragment key={i}>
                <Link to={item.path}>{item.name}</Link>
                {i<data.length-1 && (<>&gt;</>)}
                
              </React.Fragment>
            ))
          }
        </h2>
      </div>
    </div>
  )
}
